<?php

    require_once '../classes/xl_doanh_nghiep.php';
	//require_once '../classes/xl_loai_hinh_kinh_doanh.php';
	
    $ma_p = $_GET['ma_p'];
    $ma_lhkd = $_GET['ma_lhkd'];


    $xl_dn = new xl_doanh_nghiep();
	
	

    if($ma_lhkd =='all')
        $doanh_nghiep = $xl_dn->danh_sach_theo_loai_all(0,10,$ma_p);
    else
        $doanh_nghiep = $xl_dn->danh_sach_theo_loai(0,10, $ma_p, $ma_lhkd);
	$stt = 0;
	$ten_loai = 'aaa';
?>




<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Mua bán doanh nghiệp</title>

    <?php
    include('../widgets/js_css.php');
    ?>

</head>

<body>
<div class="outer">
<?php
include('../widgets/banner.php');
include('../widgets/top_menu.php');
?>

<div class="left">
    <?php
    include('../widgets/co_hoi.php');
    include('../widgets/tim_kiem_co_hoi_khac.php');
    include('../widgets/cac_chuyen_muc_hay.php');
    include('../widgets/quang_cao.php');
    include('../widgets/tim_kiem.php');
    ?>
</div>
<div class="center">
<br/>

<table width="98%" cellspacing="0" cellpadding="0" border="0" align="center" id="table5">
    <tbody>
    <tr>
        <td height="20" bgcolor="#5FA703">
            <div style="width: 30px; float: left; padding-left: 2px;"><img src="../upload/images/icon_02.gif"/></div>
            <div class="pageTitle">
                CƠ HỘI MUA DOANH NGHIỆP :: <?php echo $ten_loai ?>
            </div>
        </td>
    </tr>
    </tbody>
</table>
<br/>

<?php if(count($doanh_nghiep)==0)
    echo "<p align='center'>Đang cập nhật thông tin. Xin mời bạn quay lại sau. </p>";
    else { ?>
                <form style="display:inline" method="post" action="index.php?frame=dnghiep&amp;danhmucid=8" name="frmSearch2">
                    <table width="98%">
                        <tbody>
                        <tr>
                            <td bgcolor="#F8F8F8" class="normal_font">
                                <img src="../upload/images/search_icon.gif">
                                <input style="width:180px" size="25" class="input" value="" name="keyword2">
                                <input type="submit" class="button" value="Tìm nhanh" name="button">
                                <font color="red"><b>Tìm theo mã, tên hoặc theo địa phương</b></font></td>
                        </tr>
                        </tbody>
                    </table>
                </form>
                <br/>
                <table width="590px" cellspacing="1" border="2" align="center" cellpading="2"
                       style="border-collapse: collapse; margin: 0 auto">
                    <tbody>

                            <tr height="30" bgcolor="#99FF33" style="text-align:center;" >
                                <th width="28">STT</th>
                                <th width="67">Mã DN</th>
                                <th width="528">Doanh Nghiệp Cần Bán</th>
                                <th width="111" align="center">Giá Bán (VNĐ)</th>
                                <th width="122">Địa Phương</th>
                                <th width="81">Xem</th>
                            </tr>
                            <?php foreach($doanh_nghiep as $row){ $stt++; ?>

                                    <tr bgcolor="#ffffff" style="text-align:center;">
                                        <td width="28" align="right"
                                            style="PADDING-RIGHT: 5px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
                                            class="ProductCart">
                                            <div align="center"><?php echo $stt ?></div>
                                        </td>
                                        <td width="67" class="ProductCart" style="text-align:center;">
                                            <?php echo $row['ma'] ?>
                                        </td>
                                        <td width="528" align="center" class="">
                                            <div align="left"><a href="chi_tiet_mdn.php?ma_dn=<?php echo $row['ma'] ?>" class="mau_tieu_de" style="text-decoration: none;"><?php echo $row['gioi_thieu'] ?></a>
                                            </div>
                                            <div align="center"></div>
                                        </td>
                                        <td width="111" align="right" class="ProductPrice">
                                            <?php echo number_format($row['gia']) ?>
                                        </td>
                                        <td width="122" align="right" class="ProductPrice">
                                            <div align="center"><?php echo $row['dia_chi'] ?></div>
                                        </td>
                                        <td width="81" align="center">
                                            <a href="chi_tiet_mdn.php?ma_dn=<?php echo $row['ma'] ?>" class="detail_cohoi">Chi tiết</a></td>
                                    </tr>

                            <?php } ?>

                    </tbody>
                </table>
    <?php } ?>
</div>
<div class="right">
    <?php
    include('../widgets/dang_ky.php');
    include('../widgets/thue_cho_thue.php');
    include('../widgets/tin_tuc_IDJ.php');
    include('../widgets/doi_tac.php');
    ?>
</div>

<?php
include('../widgets/footer.php');
?>
</div>
</body>
</html>